package com.java01.lang.exception;

public class DataExceptionCatcher {

	public static void main(String[] args) {
		Object data = "This is data";
		
		DataVerifier verifier = new DataVerifier();

		try {
			verifier.checkData(data);
		} catch (DataException e) {
			System.out.println(e.getMessage());
		}
		
		data = null;
		
		try {
			verifier.checkData(data);
		} catch (DataException e) {
			System.out.println(e.getMessage());
		}
	}
}
